/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.sys.security;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.jeeplus.common.utils.text.EncodeUtil;

/**
 * 用户和密码（包含验证码）令牌类
 * @author jeeplus
 * @version 2016-5-19
 */
public class UsernamePasswordToken extends org.apache.shiro.authc.UsernamePasswordToken {

	private static final Logger logger = LoggerFactory.getLogger(UsernamePasswordToken.class);

	public static final String _MOBILE_SIGN = "Z00H@MOBILESIGN";

	public static final String _MOBILE_SIGN_CIPHERTEXT = "WjAwSEBNT0JJTEVTSUdO";

	private static final long serialVersionUID = 1L;

	private String mobileSign;// TODO

	private String captcha;

	private boolean mobileLogin;

	public UsernamePasswordToken() {
		super();
	}

	public UsernamePasswordToken(String username, char[] password, boolean rememberMe, String host, String captcha,
			boolean mobileLogin) {
		super(username, password, rememberMe, host);
		this.captcha = captcha;
		this.mobileLogin = mobileLogin;
	}

	public UsernamePasswordToken(String username, char[] password, boolean rememberMe, String host, String captcha,
			boolean mobileLogin, String mobileSign) {
		super(username, password, rememberMe, host);
		this.captcha = captcha;
		this.mobileLogin = mobileLogin;
		this.mobileSign = mobileSign;
	}

	public String getCaptcha() {
		return captcha;
	}

	public void setCaptcha(String captcha) {
		this.captcha = captcha;
	}

	public boolean isMobileLogin() {
		return mobileLogin;
	}

	public String getMobileSign() {
		return mobileSign;
	}

	public void setMobileSign(String mobileSign) {
		this.mobileSign = mobileSign;
	}

	public static void main(String[] args) {
		System.err.println(EncodeUtil.encodeBase64(_MOBILE_SIGN.getBytes()));
	}

}